package com.lipaluma.examples.annotation.onetomany;

import java.util.List;

import com.lipaluma.annotations.mapping.MapColumn;
import com.lipaluma.annotations.merge.Id;
import com.lipaluma.annotations.merge.MergeTarget;
import com.lipaluma.annotations.merge.OneToMany;
import com.lipaluma.csv.annotations.config.CSV;

@MergeTarget
@CSV(delimiter=';', hasHeader=true, mapColumnsByHeaders=true, trimAll=true)
public class Client {
	@Id
	@MapColumn(columnName="CLIENT_ID")
	private Long id;
	
	@MapColumn(columnName="CLIENT_NAME")
	private String name;
	
	@OneToMany
	private List<Invoice> invoices;
	
	public Long getId() {
		return id;
	}
	public String getName() {
		return name;
	}
	public List<Invoice> getInvoices() {
		return invoices;
	}
}
